package com.tjetc.dao;

import com.tjetc.domain.Animal;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface AnimalMapper {
    List<Animal> list(Integer adopted);

    @Insert("insert into animal(cid, breed, age, status, adopted) VALUES " +
            "(#{cid},#{breed},#{age},#{status},#{adopted})")
    int add(Animal animal);

    @Select("select * from animal where id=#{id}")
    Animal getById(int id);


    int update(Animal animal);



}
